package com.qing.servicebase.config;

import com.qing.servicebase.utils.SnowFlakeIdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName Yjx
 * @Description TODO
 * @date 2022/9/7 18:35
 * @Version 1.0
 */
@Configuration
public class BeanCommonConfig {

    /**
     * id生成
     *
     * @return SnowFlakeIdWorker
     */
    @Bean
    public SnowFlakeIdWorker snowFlakeIdWorker() {
        return new SnowFlakeIdWorker(0, 0);
    }


    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
